From: Andrea Azzarone Date: Wed, 12 Sep 2018 20:13:04 +0000 (+0200) Subject: popupMenu: Handle keypress if numlock is enabled X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~897^2~1^2~79 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=88556226669067585bf05c8d78624a072c41b98f;p=gnome-shell.git popupMenu: Handle keypress if numlock is enabled Add exception to handle a keypress if numlock is enabled as we already do for capslock. This uses Clutter.ModifierType.MOD2_MASK because at the moment there is not a more explicit way to refer to the numlock mask. Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/550 --- diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 0895321cb..b0a919d1b 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -143,9 +143,10 @@ var PopupBaseMenuItem = new Lang.Class({ _onKeyPressEvent(actor, event) { let state = event.get_state(); - // if user has a modifier down (except capslock) + // if user has a modifier down (except capslock and numlock) // then don't handle the key press here state &= ~Clutter.ModifierType.LOCK_MASK; + state &= ~Clutter.ModifierType.MOD2_MASK; state &= Clutter.ModifierType.MODIFIER_MASK; if (state)